package com.company.demo;

import java.util.HashMap;

import redis.clients.jedis.Jedis;

public class JedisClientTest {


    public static void main(String[] args) {
		
		//创建一个jedis客户端对象（redis的客户端连接）
		Jedis client = new Jedis("192.168.15.137", 6379);
		
		//测试服务器是否连通
		String resp = client.ping();

		client.set("game","battlefield");

		String game = client.get("game");

		byte[] a = {'a','b','c'};
		client.set(new byte[]{'a'},a);

		System.out.println(new String(client.get(new byte[]{'a'})));

		client.hset("map","girlfriend","minmin");
		System.out.println("map:"+client.hgetAll("map"));

		client.close();
		
	}
	
	
	

}